<%@ page import="org.bjou.BranchCourse" %>
<!doctype html>
<html>
  <head>
    <meta name="layout" content="pertho">
  <g:set var="entityName" value="${message(code: 'branchCourse.label', default: 'BranchCourse')}" />
  <title><g:message code="default.edit.label" args="[entityName]" /></title>
</head>
<body>

  <div class="container">
    <div class="row">
      <div class="twelve columns">
        <div class="box_c">
          <div class="box_c_heading cf">
            <p>编辑选课信息</p>
          </div>
          <div class="box_c_content">
            <!-- start -->
            <div id="edit-branchCourse" class="content scaffold-edit" role="main">
              <g:if test="${flash.message}">
                <div class="message" role="status">${flash.message}</div>
              </g:if>
              <g:hasErrors bean="${branchCourseInstance}">
                <ul class="errors" role="alert">
                  <g:eachError bean="${branchCourseInstance}" var="error">
                    <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
                  </g:eachError>
                </ul>
              </g:hasErrors>
              <g:form method="post" >
                <g:hiddenField name="id" value="${branchCourseInstance?.id}" />
                <g:hiddenField name="version" value="${branchCourseInstance?.version}" />
                <fieldset class="form">

                  <div class="fieldcontain ${hasErrors(bean: branchCourseInstance, field: 'teacherName', 'error')} ">
                    <label for="teacherName">
                      <g:message code="branchCourse.teacherName.label" default="Teacher Name" />

                    </label>
                    <g:textField name="teacherName" value="${branchCourseInstance?.teacherName}"/>
                  </div>

                  <div class="fieldcontain ${hasErrors(bean: branchCourseInstance, field: 'teacherTitle', 'error')} ">
                    <label for="teacherTitle">
                      <g:message code="branchCourse.teacherTitle.label" default="Teacher Title" />

                    </label>
                    <g:textField name="teacherTitle" value="${branchCourseInstance?.teacherTitle}"/>
                  </div>

                  <div class="fieldcontain ${hasErrors(bean: branchCourseInstance, field: 'teacherTel', 'error')} ">
                    <label for="teacherTel">
                      <g:message code="branchCourse.teacherTel.label" default="Teacher Tel" />

                    </label>
                    <g:textField name="teacherTel" value="${branchCourseInstance?.teacherTel}"/>
                  </div>
                  
                   <div class="fieldcontain ${hasErrors(bean: branchCourseInstance, field: 'teacherQty', 'error')} ">
                    <label for="teacherQty">
                      <g:message code="branchCourse.teacherQty.label" default="teacherQty" />

                    </label>
                     <g:field type="number" name="teacherQty" min="0" max="1000" required="" value="${branchCourseInstance?.teacherQty}"/>
                   
                  </div>

                  <div class="fieldcontain ${hasErrors(bean: branchCourseInstance, field: 'currentTerm', 'error')} ">
                    <label for="currentTerm">
                      <g:message code="branchCourse.currentTerm.label" default="Current Term" />

                    </label>
                    <g:textField readonly="readonly" name="currentTerm" value="${branchCourseInstance?.currentTerm}"/>
                  </div>

                
                </fieldset>
                <fieldset class="buttons">
                  <g:actionSubmit class="gh_button" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" />
                  <g:actionSubmit class="gh_button danger" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" formnovalidate="" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
                </fieldset>
              </g:form>
            </div>
            <!-- end -->
          </div>
        </div>
      </div>
    </div>
  </div>

</body>
</html>
